package com.villaday.idf.adapter2;

import android.content.Context;
import android.view.View;

import com.villaday.idf.R;
import com.villaday.idf.base.AbsRecyclerViewAdapter;
import com.villaday.idf.base.OnAdapterCallbackListener;
import com.villaday.idf.model.RefreshtokenEntity;
import com.villaday.idf.model2.Home_configurations;
import com.villaday.idf.model2.Hot_houses;
import com.villaday.idf.util.SharedPreferencesUtil;

import byc.imagewatcher.MessagePicturesLayout;

/**
 * 首页动态列表
 */

public class HomeTypeAdapter extends AbsRecyclerViewAdapter<Home_configurations.BodyEntity.ScenesEntity> {
    private OnAdapterCallbackListener onAdapterCallbackListener;
    private View.OnClickListener onClickListener;
    private MessagePicturesLayout.Callback mCallback;
    private final String roleType;

    public HomeTypeAdapter(Context context) {
        super(context, R.layout.item_home2v_type, /*R.layout.item_dynamic_1, R.layout.item_dynamic_2,*/ R.layout.item_page_loading,
                R.layout.item_page_bottom);
        this.onAdapterCallbackListener = onAdapterCallbackListener;
        this.onClickListener = onClickListener;

        RefreshtokenEntity.BodyBean roleInfo =
                SharedPreferencesUtil.getRoleInfo(context);
        roleType = roleInfo.getMember().getType();


    }

    @Override
    public int getItemType(Home_configurations.BodyEntity.ScenesEntity d) {
        return 0;
    }

    @Override
    public void onBindHolder(AbsRecyclerViewAdapter.RecyclerViewHolder holder, Home_configurations.BodyEntity.ScenesEntity d, int position) {
        holder.bindTextView(R.id.tv_name,d.getName())
                .bindSimpleDraweeView(R.id.sdv,d.getMaterial().getUrl());
    }
}
